<?php
	if (isset($options['type']) && (strcasecmp($options['type'], 'detail')==0)) {
		$metadata = compact('application', 'application_title', 'unit', 'unit_title', 'unit_controller', 'page');

		$data = $data['detail'];
		$actions = $actions['detail'];
		
		$content_data		= array_merge($metadata, compact('nav', 'options', 'data', 'actions'));
		$this->load->view('viewer/columnar', $content_data);
	} else if (isset($options['keys'])) {
		$ori_data = $data;
		$ori_actions = $actions;
		$metadata = compact('application', 'application_title', 'unit', 'unit_title', 'unit_controller', 'page');

		$data = $ori_data['master'];
		$actions = $ori_actions['master'];
		$content_data		= array_merge($metadata, compact('nav', 'options', 'data', 'actions'));
		$this->load->view('viewer/columnar', $content_data);
			
		$data = $ori_data['detail'];
		$actions = $ori_actions['detail'];
		$content_data		= array_merge($metadata, compact('nav', 'options', 'data', 'actions'));

		$this->load->view('viewer/tabular', $content_data);
	} else {
		$metadata = compact('application', 'application_title', 'unit', 'unit_title', 'unit_controller', 'page');
		
		$data = $data['master'];
		$actions = $actions['master'];
		$content_data		= array_merge($metadata, compact('nav', 'options', 'data', 'actions'));
		$this->load->view('viewer/tabular', $content_data);
	}